<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="Model.*" %>
<%@page import="bean.NewsBean" %>
<%@page import="java.util.*"%>

<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>
</head>
<body marginwidth="100px" bgcolor="#FFFFDD" >
<table width="100%" border="0" align="center" cellspacing="0px"  background= "../picture/background.jpg">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
	<jsp:include page="header.jsp" />	</td>
  </tr>
  <tr>
    <td>
	<table width="100%" border="0" cellspacing="0">
      <tr>
        <td width="140" valign="top" style="border-right: 2px solid #cccccc">
            <jsp:include page="left.jsp" /></td>
            <td  valign="top" align="left">
                <table width="100%" cellpadding="2" cellspacing="2" border="0" align="left">
        <% 
       ArrayList<NewsBean> newsList = NewsModel.listNews();
       if(!newsList.isEmpty())
           {
        Iterator<NewsBean> it = newsList.iterator();
        int i =0;
        NewsBean news;
        while(it.hasNext())
            {
            i++;
            news = it.next();
%>



		<tr >
			<td height="30" background="../picture/tintuc2.gif" width="100%"  colspan="3">
                            <font color="#FFFF00" size="4">
                            Tin tuc <%=i%>
                            </font></td>
		</tr>
                            <% if(news.getImage()!=null && news.getImage().trim()!="")  {%>
                           
		<tr  valign="top">
                    <td width="23%"><img src="../products/<%=news.getImage() %>" height="80" width="80"/></td>
			
		</tr><% } %>
		<tr>
			<td colspan > <span class="style19"> <%=news.getContent()%></span><BR></td>
		</tr>
		
		<tr>
			<td colspan= align="center">
			<BR><BR><HR width="90%" size="2px" style=" color: #0033FF"></td>
		</tr>
		
	
<% }}else
       {%>
       <tr><td>Khong co tin gi duoc dang</td></tr>
                    <%}%>
</table>
</td>
                         <td width="100" valign="top" style="border-left: 2px solid #cccccc" >
                             <jsp:include page="right.jsp" /></td>
              </tr>
	      </table>

        </td>

      </tr>

  <tr>
    <td>footer</td>
  </tr>
</table>
</body>
</html>
